<template>
	<view>
		<view class="paper"><text class="iconfont" style="color: #e64340;"> &#xe7cb;</text>归国信息编号：{{bid}}</view>
		<view class="paper"><text class="iconfont" style="color: #2187e6;"> &#xe611;</text> 出国信息编号：{{aid}}</view>
		<view class="paper"><text class="iconfont" style="color: #16e669;"> &#xe62a;;</text> 出国时间：{{start_time}}</view>
		<view class="paper"><text class="iconfont" style="color: #e6e61d;"> &#xe62a;</text> 回国时间：{{end_time}} </view>
		<view class="paper"><text class="iconfont" style="color: #e61b95;"> &#xe772;</text> 国家：{{country}} </view>
	</view>
</template>
<script>
	import {
		changeInfo
	} from '@/api/tAbroad.js'
	export default {
		data() {
			return {
				bid: '',
				aid: '',
				start_time: '',
				end_time: '',
				country: ''
			}
		},
		methods: {
			getData() {
				uni.showLoading()
				changeInfo({
					bid: this.bid
				}).then(res => {
					if (res.data.code == 0) {
						this.aid = res.data.data.aid
						this.start_time = res.data.data.startTime
						this.end_time = res.data.data.backTime
						this.country = res.data.data.country
						uni.hideLoading()
					} else {
						uni.hideLoading()
						uni.showModal({
							content: '请求失败'
						})
					}
				}).catch(err => {
					uni.hideLoading()
					uni.showModal({
						content: '请求失败'
					})
				})
			}
		},
		onLoad(option) {
			this.bid = option.bid
			this.getData()
		}
	}
</script>

<style>
	.iconfont {
		font-family: "iconfont" !important;
		font-size: 16px;
		font-style: normal;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
		margin-right: 10px;
	}
	.paper {
		position:relative;
		background:#fff;
		border:1px solid #eee;
		margin:10px;
		box-shadow:0 0 5px rgba(0,0,0,0.27),0 0 20px  rgba(0,0,0,.1) inset;
		padding: 15px;
		font-size: 16px;
		font-family: 'Courier New', Courier, monospace;
		margin: 10px;
		border-radius: 15px;
	}
	.paper::after,.paper::before {
		content:'';
		position:absolute;
		bottom:6px;
		width:100px;
		height:1px;
		z-index:-1;
		box-shadow:0 2px 12px 5px rgba(0,0,0,.3);
	}
	.paper::after {
		left:4px;
		transform:rotate(-6deg);
	}
	.paper::before {
		right:4px;
		transform:rotate(6deg);
	}
</style>
